package com.p2p.Androidp2p;



//class to hold the name and download percentage of a file currently downloading
public class DL_File {
    private String f_name;
    private double DLPercentage;
    

    	public DL_File(String fileName){
    	    f_name = fileName;
    	    DLPercentage = 0.0;
    	}
    
	/**
	 * @param f_name the f_name to set
	 */
	public void setFileName(String f_name) {
		this.f_name = f_name;
	}
	/**
	 * @return the f_name
	 */
	public String getFileName() {
		return f_name;
	}
	/**
	 * @param dLPercentage the dLPercentage to set
	 */
	public void setDLPercentage(double dLPercentage) {
		DLPercentage = dLPercentage;
	}
	/**
	 * @return the dLPercentage
	 */
	public double getDLPercentage() {
		return DLPercentage;
	}
	
	/**
	 * Compares this <tt>DL_FILE</tt> to the given object.
	 *
	 * @param o the object to compare with.
	 * @return <tt>true</tt> if the objects are the same;
	 *         <tt>false</tt> otherwise.
	 */
	public boolean equals(Object o) {
	        if (o != null && o.getClass() == this.getClass()) {
	            return this.getFileName() == ((DL_File) o).getFileName();
	        }
	        return false;
	}
}
